package com.lzy.huijinjiazu.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.lzy.huijinjiazu.mvp.contract.PaymentSuccessContract;
import com.lzy.huijinjiazu.mvp.model.PaymentSuccessModel;


@Module
public class PaymentSuccessModule {
    private PaymentSuccessContract.View view;

    /**
     * 构建PaymentSuccessModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public PaymentSuccessModule(PaymentSuccessContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    PaymentSuccessContract.View providePaymentSuccessView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    PaymentSuccessContract.Model providePaymentSuccessModel(PaymentSuccessModel model) {
        return model;
    }
}